package com.eliza.kotlin.design.creation.prototype.test

import com.eliza.ktor.all.library.utils.ToolsLog

/**
 * @version v1.0
 * @ClassName: CitaionTest
 * @Description: TODO(一句话描述该类的功能)
 * @Author: 黑马程序员
 */
object CitaionTest {
    @Throws(CloneNotSupportedException::class)
    @JvmStatic
    fun main(args: Array<String>) {
        //1，创建原型对象
        val citation = Citation()
        //创建张三学生对象
        val stu = Student()
        stu.name = "张三"
        citation.stu = stu

        //2,克隆奖状对象
        val citation1 = citation.clone()
        val stu1 = citation1.stu
        stu1!!.name = "李四"

        /*citation.setName("张三");
        citation1.setName("李四");*/

        //3,调用show方法展示
        citation.show()
        citation1.show()

        ToolsLog.LogPrintln("${citation == citation1}", 4)
    }
}